/*
 * @Author: your name
 * @Date: 2022-02-23 23:31:38
 * @LastEditTime: 2022-02-25 13:51:10
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /aone_flutter/lib/router/router.dart
 */
import 'package:aone_common/common.dart';
import 'package:prototype/views/activity/activity_view.dart';
import 'package:prototype/views/game/game_view.dart';
import 'package:prototype/views/game_category/game_category_view.dart';
import 'package:prototype/views/game_init/game_init_view.dart';
import 'package:get/get_navigation/get_navigation.dart';
import 'package:prototype/views/home/home_view.dart';
import 'package:prototype/views/main/main_view.dart';
import 'package:prototype/views/user/user_view.dart';

import '../views/authenticate/authenticate_view.dart';

List<GetPage> routers = [
  GetPage(name: '/', page: () => const MainPageView()),
  GetPage(name: Routes.home, page: () => const MainPageView()), //首页路由
  GetPage(name: Routes.activity, page: () => const MainPageView()), //首页路由
  GetPage(name: Routes.user, page: () => const MainPageView()), //首页路由
  GetPage(name: Routes.login, page: () => const AuthView()), //登陆路由
  GetPage(name: Routes.userReg, page: () => const AuthView()), //会员注册路由
  GetPage(name: Routes.gameInit, page: () => const GameInitView()), // 游戏加载
  GetPage(name: Routes.gameCategory, page: () => const GameCategoryView()), // 游戏
  GetPage(name: Routes.gameWebView, page: () => const GameView()), // webView
  GetPage(
    name: Routes.user,
    page: () => const MainPageView(),
    middlewares: [
      RouteAuthMiddleware(authLevel: AuthLevel.regular),
    ],
    children: const [
      // todo
    ],
  ),
];
